|
|
|
|
|
|
|
(text box continued from previous page) |
|
|
|
 |
|
|
|
|
Company: MicroDexterity, Inc.
Product: Muscle32/Stamina
Web site: http://www.microdexterity.com Email: sales@mdxi.com or support@mdxi.com |
|
|
|
|
|
|
|
|
|
Red Flags to Look for with Black Box Components |
|
|
|
|
|
|
|
|
Gray box controls are those controls where you have knowledge of the interfaces of public classes within a component. With gray box controls, you have some inkling as to which classes and subsystems in the control are responsible for certain behavior. Black box controls, on the other hand, don't give you any clues as to how the component processes your method calls. You know only the external interface. This has its benefit and drawback. |
|
|
|
|
|
|
|
|
The Benefit of Choosing Gray Box Components |
|
|
|
|
|
|
|
|
The benefit is that you don't have to worry about the internal complexities of the control. This is acceptable for a well-designed control. Just plug it into your code, and you're ready to deploy the application to your users. |
|
|
|
|
|
|
|
|
The Risk of Selecting Black Box Components |
|
|
|
|
|
|
|
|
The drawback is that when things go wrong, you won't know which part of the control is at fault so that you can plan to replace it. Because the risk of vendor failure is real, blind dependence on a third-party control can be unhealthy. |
|
|
|
|
|
|
|
|
Designing Class Models with Third-Party Controls |
|
|
|
|
|
|
|
|
After you've assigned your third-party controls to roles in your object interaction diagrams (such as sequence or collaboration diagrams), you incorporate them by role name in your class model. Ideally, the control should perform the role of an object implementing an interface class. It is important to use only the role name because at some point you might find it necessary to replace the control with a comparable but improved one. Therefore, you want to encapsulate your interaction diagrams and class models from such changes by assigning adequate role names to your controls. |
|
|
|
|
|
|
|
|
For instance, assume you're using Crystal Reports for your reporting. Now compare Figure 7.2 with Figure 7.3. In Figure 7.2, step 5, openReport, is implemented by an |
|
|
|
|
|